package com.weitao.marketserver.pojo;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;

import java.util.Date;

/**
 * 对应管理员数据表
 */
@Data
@TableName("admins")
public class Admins {
    @TableId(type = IdType.ASSIGN_ID)
    @JsonSerialize(using = ToStringSerializer.class)
    public Long id;

    public String username;
    public String password;
    public String roles;

    //    创建
    @TableField(fill = FieldFill.INSERT)
    public Date tmcreate;
    //    更新
    @TableField(fill = FieldFill.INSERT_UPDATE)
    public Date tmmodified;
    //    乐观锁
    @Version
    public Integer version;
    //    逻辑删除
    public Integer deleted;
}
